home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
028a
/
number.zip
/
NUMBER.BAT
Wrap
DOS Batch File
|
1991-11-23
|
751b
|
23 lines
@ECHO OFF
REM This is NUMBER.BAT
IF %1!==! GOTO OOPS
COPY %1 BACKUP! > NUL
FIND /N /V "!@#$" %1 | FIND /V "---" > %1
ECHO File %1 now has line numbers
GOTO END
:OOPS
cls
ECHO +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ECHO + This batch file numbers all the lines in a text file. +
ECHO + It creates a backup file called BACKUP! in case you +
ECHO + want the old file back without line numbers. +
ECHO +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PAUSE
cls
ECHO.
ECHO Enter the name of the file
ECHO you want to add line numbers to
ECHO after typing the word "number"
@ECHO OFF
:END
ECHO ON